<Widget:show bdcls="no-padding" col="12" title="" >
<Widget:action >
    <a class="btn blue "  ajax-dialog href="{:U("Index/editItem?f=$f")}">项目信息</a>
    <a class="btn blue " data-pjax href="{:U("Dic/index?f=$f")}">字典信息</a>
    <a class="btn blue " target="_blank" href="{:U("DB/document?f=$f&t=all")}">生成文档</a>
</Widget:action>
<div class="table-scrollable">
    <table class="table table-striped table-bordered table-hover">
        <thead>
        <tr>
            <th>表</th>
            <th>注释</th>
            <th>引擎</th>
            <th>编码</th>
            <!-- <th>数据长度</th> -->
            <!-- <th>索引长度</th> -->
            <!-- <th>数据空闲</th> -->
            <th>自动增量</th>
            <th>行数</th>
            <th width="180">生成</th>
        </tr>
    </thead>
    <volist name="tables" id="tb">
        <tr>
            <td>{$tb.table_name}</td>
            <td>
              <a href="#" editable-input data-name="{$tb.table_name}" data-type="text" data-pk="{$tb.table_name}" >{$tb.table_comment}</a>
            </td>
            <td>{$tb.engine}</td>
            <td>{$tb.table_collation}</td>
            <!-- <td>{$tb.data_length}</td> -->
            <!-- <td>{$tb.index_length}</td> -->
            <!-- <td>{$tb.data_free}</td> -->
            <td>{$tb.auto_increment}</td>
            <td>{$tb.table_rows}</td>
            <td>
                <a class="btn btn-default btn-xs" data-ajax href="{:U("Db/creatC?name=$tb[table_name]&f=$f")}">控制器</a>
                <a class="btn btn-default btn-xs" data-ajax href="{:U("Db/creatM?name=$tb[table_name]&f=$f")}">模型</a>
                <a class="btn btn-default btn-xs" data-pjax href="{:U("Db/table?tb=$tb[table_name]&f=$f")}">表单</a>
            </td>
        </tr>
        </volist>
    </table>
</div>
</Widget:show>



<script type="text/javascript">
$(function(){
    var url = "{:U("index/updateTable?tb=$tb&f=$f")}";
    $.fn.editable.defaults.url = url;
    $('[editable-input]').editable({
        inputclass: 'form-control ',
    });
})
</script>
